package com.vector.demo.service.impl;

import com.vector.demo.mapper.TaskMapper;
import com.vector.demo.pojo.Task;
import com.vector.demo.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TaskServiceImpl implements TaskService {
    @Autowired
    TaskMapper taskMapper;
    @Override
    public int addTask(Task task) {
        return taskMapper.addTask(task);
    }

    @Override
    public int deleteTask(Integer id) {
        return taskMapper.deleteTask(id);
    }

    @Override
    public int updateTask(Task task) {
        return taskMapper.updateTask(task);
    }

    @Override
    public Task queryTaskById(int id) {
        return taskMapper.queryTaskById(id);
    }

    @Override
    public Task queryTaskByName(String name) {
        return taskMapper.queryTaskByName(name);
    }

    @Override
    public List<Task> queryAllTask() {
        return taskMapper.queryAllTask();
    }

    @Override
    public List<Task> queryAllTaskByStatus(int id) {
        return taskMapper.queryAllTaskByStatus(id);
    }
}
